package com.egghiro.j2se.game.scardbattle.model.character;

import java.util.List;

import com.egghiro.j2se.game.scardbattle.model.actor.status.Status;

public abstract class GameCharacter {
    protected int hp;
    protected List<Status> statusList;

    public int getHp() {
        return hp;
    }

    public void setHp(int hp) {
        this.hp = hp;
    }
    
    /**
     * hp += addHp <br>
     * 負数OK。hp < 0の場合hp = 0
     * @param addHp 
     */
    public void addHp(int addHp){
       this.hp += addHp;
       if(this.hp < 0){
           this.hp = 0;
       }
    }
    /**
     * addHp(-subtractHp)
     * @param subtractHp
     */
    public void subtractHp(int subtractHp){
        this.addHp(-subtractHp);
    }

}
